//
//  StoreViewController.m
//  HaiGoumerMerchant
//
//  Created by apple on 17/1/17.
//  Copyright © 2017年 com.zaoguankeji.www. All rights reserved.
//

#import "StoreViewController.h"
#import "StoreEditViewController.h"
#import "StoreControlViewController.h"
#import "ShowTimeViewController.h"
#import "EventListViewControlController.h"
#import "EvaluateTableViewController.h"
#import "MessageTableViewController.h"

#import "MineTableViewController.h"
@interface StoreViewController ()

//新消息
@property (weak, nonatomic) IBOutlet UIButton *StorIconMessageBtn;

//新消息
@property (weak, nonatomic) IBOutlet UIButton *freshMessageBtn;
//活动
@property (weak, nonatomic) IBOutlet UIButton *evaluateOneBtn;
//活动
@property (weak, nonatomic) IBOutlet UIButton *soonStarteventBtn;
//活动
@property (weak, nonatomic) IBOutlet UIButton *soonEndeventBtn;

//商品管理
@property (weak, nonatomic) IBOutlet UIButton *goodsControlBtn;
//评价
@property (weak, nonatomic) IBOutlet UIButton *evaluateBtn;
//数据中心
@property (weak, nonatomic) IBOutlet UIButton *informationBtn;
//活动
@property (weak, nonatomic) IBOutlet UIButton *eventBtn;

@end

@implementation StoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // 设置文字
  
    self.view.backgroundColor = [UIColor whiteColor];
    [self setStoreViewControllerNavigationItem];
    // Do any additional setup after loading the view.
}


//设置导航控制器
-(void)setStoreViewControllerNavigationItem{
    self.navigationItem.title = @"管家";
    UIBarButtonItem *rightBackButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"fanghui"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(gotoPreferences)];
    self.navigationItem.rightBarButtonItem = rightBackButton;
    
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
    
    //    UIBarButtonItem *rightBackButton = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStyleDone target:self action:@selector(saveUsername)];
    //    self.navigationItem.rightBarButtonItem = rightBackButton;
}

//MARK: gotoPreferences
- (void)gotoPreferences {

  MineTableViewController *vc = [UIStoryboard loadStoryboard:MineTableViewControllerID];
    vc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];


}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}







///MARK: BtnAction

- (IBAction)StorIconMessageBtnAction:(id)sender {
    
    StoreEditViewController *vc = [UIStoryboard loadStoryboard:StoreEditViewControllerID];
    vc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
    
}

//商品管理
- (IBAction)goodsControlBtnAction:(id)sender {
    StoreControlViewController *vc = [StoreControlViewController new];
    vc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
}

//评价

- (IBAction)evaluateBtnBtnAction:(id)sender {
    EvaluateTableViewController *timeController=[[EvaluateTableViewController alloc]init];
    timeController.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:timeController animated:YES];
}

//数据中心
- (IBAction)informationBtnAction:(id)sender {
    ShowTimeViewController *timeController=[[ShowTimeViewController alloc]init];
    timeController.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:timeController animated:YES];
}

//活动
- (IBAction)eventBtnAction:(id)sender {
     EventListViewControlController*timeController=[EventListViewControlController new];
    timeController.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:timeController animated:YES];
}
//活动
- (IBAction)freshMessageBtnAction:(id)sender {
    MessageTableViewController*timeController=[UIStoryboard loadStoryboard:MessageTableViewControllerID];
    timeController.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:timeController animated:YES];
}


@end
